'use strict';

let { sequelize, defineModel, DataTypes } = require('../db');

// 定义一个模型(题目表)
let Model = defineModel('questionairs', {

    topic: {
        type: DataTypes.STRING(80),
        allowNull: false
    },
    introduction: {
        type: DataTypes.STRING(500),
        allowNull: true
    },
    promoterId: {
        type: DataTypes.BIGINT,
        allowNull: false
    },
    questionOne: {
        type: DataTypes.STRING,
        allowNull: false
    },

    questionTwo: {
        type: DataTypes.STRING,
        allowNull: false
    },
    questionThree: {
        type: DataTypes.STRING,
        allowNull: false
    },
    questionFour: {
        type: DataTypes.STRING,
        allowNull: false
    },
    questionFive: {
        type: DataTypes.STRING,
        allowNull: false
    },
    questionSix: {
        type: DataTypes.STRING,
        allowNull: false
    },
    questionSeven: {
        type: DataTypes.STRING,
        allowNull: false
    },
    questionEight: {
        type: DataTypes.STRING,
        allowNull: false
    },
    questionNine: {
        type: DataTypes.STRING,
        allowNull: false
    },
    questionTen: {
        type: DataTypes.STRING,
        allowNull: false
    },
    // 状态：1为已发表，2为未发表，3为已删除
    state: {
        type: DataTypes.BIGINT,
        allowNull: false,
        defaultValue: 1
    }
    

});


module.exports = Model